import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)
const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    redirect: '/index',
    children: [
      {
        path: 'index',
        name: 'index',
        component: () => import('@/views/Index.vue')
      },
      {
        path: 'tchIndex',
        name: 'tchIndex',
        component: () => import('@/views/TchIndex.vue')
      },
      {
        path: 'stuIndex',
        name: 'stuIndex',
        component: () => import('@/views/StuIndex.vue')
      },
      {
        path: 'exec',
        name: 'exec',
        component: () => import('@/views/Exec.vue')
      },
      {
        path: 'classManage',
        name: 'classManage',
        component: () => import('@/views/ClassManage.vue')
      },
      {
        path: 'createSubject',
        name: 'createSubject',
        component: () => import('@/views/CreateSubject.vue')
      },
      {
        path: 'subjectManage',
        name: 'subjectManage',
        component: () => import('@/views/SubjectManage.vue')
      },
      {
        path: 'createClass',
        name: 'createClass',
        component: () => import('@/views/CreateClass.vue')
      },
      {
        path: 'createPaper',
        name: 'createPaper',
        component: () => import('@/views/CreatePaper.vue')
      },
      {
        path: 'paperList',
        name: 'paperList',
        component: () => import('@/views/PaperList.vue')
      },
      {
        path: 'examList',
        name: 'examList',
        component: () => import('@/views/ExamList.vue')
      },
      {
        path: 'examRecord',
        name: 'examRecord',
        component: () => import('@/views/ExamRecord.vue')
      },
      {
        path: 'answerResult',
        name: 'answerResult',
        component: () => import('@/views/AnswerResult.vue')
      },
      {
        path: 'person',
        name: 'person',
        component: () => import('@/views/Person.vue')
      },
      {
        path: 'examination',
        name: 'examination',
        component: () => import('@/components/examination/Paper.vue')
      },
      {
        path: 'entry',
        name: 'entry',
        component: () => import('@/components/examination/Entry.vue')
      },
      {
        path: 'execEntry',
        name: 'execEntry',
        component: () => import('@/components/examination/ExecEntry.vue')
      },
      {
        path: 'errorManage',
        name: 'errorManage',
        component: () => import('@/views/ErrorManage.vue')
      },
      {
        path: 'stuClass',
        name: 'stuClass',
        component: () => import('@/views/StuClass.vue')
      },
      {
        path: 'analysis',
        name: 'analysis',
        component: () => import('@/components/examination/Analysis.vue')
      },
      {
        path: 'dataAnalysis',
        name: 'dataAnalysis',
        component: () => import('@/views/DataAnalysis.vue')
      },
      {
        path: 'errorAnalysis',
        name: 'errorAnalysis',
        component: () => import('@/components/examination/ErrorAnalysis.vue')
      },
    ]
  }
]

const router = new VueRouter({
  mode: 'history',
  routes
})

export default router
